import Vue from 'vue'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import '@/init/main.scss';
import '@/init/init.scss';
import '@/init/theme.scss'
import App from '@/App.vue'
import api from '@/api/index'
import utils from '@/utils/utils'
import common from '@/utils/common'
import validate from '@/utils/validate'
import router from '@/router'
import store from '@/store'
import {
  formatDate,
  formatTime,
  formatPrice
} from '@/utils/format'
import VueResource from 'vue-resource';
import '@/registerServiceWorker'

Vue.config.productionTip = false;

Vue.filter('formatDate', formatDate);
Vue.filter('formatTime', formatTime);
Vue.filter('formatPrice', formatPrice);
Vue.prototype.$api = api;
Vue.prototype.$utils = utils;
Vue.prototype.$common = common;
Vue.prototype.$validate = validate;

Vue.use(ElementUI, {
  size: 'medium',
  zIndex: 3000
});
Vue.use(VueResource)

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
